Sparse fixes.
authorMukund Sivaraman <muks@mukund.org>
Thu, 3 Apr 2008 02:50:27 +0000 (02:50 +0000)
committerMukund Sivaraman <muks@src.gnome.org>
Thu, 3 Apr 2008 02:50:27 +0000 (02:50 +0000)
2008-04-02  Mukund Sivaraman <muks@mukund.org>

        Sparse fixes.

        * babl/babl-internal.h: fflush() takes pointer.

        * babl/babl-conversion.c: Don't mix code and declarations.

        * babl/babl-fish-reference.c: Fixed array assignment.

svn path=/trunk/; revision=302

ChangeLog
babl/babl-conversion.c
babl/babl-fish-reference.c
babl/babl-internal.h

index c278ccb780e48e42411d664b85057530644b916b..6287e3112cb77f80e8798eaf3f7d5e22cf06d9ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-04-02  Mukund Sivaraman <muks@mukund.org>
+
+       Sparse fixes.
+
+       * babl/babl-internal.h: fflush() takes pointer.
+
+       * babl/babl-conversion.c: Don't mix code and declarations.
+
+       * babl/babl-fish-reference.c: Fixed array assignment.
+
 2008-04-03  Øyvind Kolås  <pippin@gimp.org>
 
        Applied patch from Jan Heller that ports BablFishPath class to the new
index 461eee34ac1e2d23a64856472183d408fb0e70e8..babca8511b69643dd701e5a8214a5545f64a8028 100644 (file)
@@ -189,6 +189,8 @@ babl_conversion_new (void *first_arg,
   Babl          *source;
   Babl          *destination;
 
+  char          *name;
+
   va_start (varg, first_arg);
   source      = (Babl *) arg;
   destination = va_arg (varg, Babl *);
@@ -258,10 +260,10 @@ babl_conversion_new (void *first_arg,
       type = BABL_CONVERSION_PLANAR;
     }
 
-  char * name = create_name (source, destination, type);
-  
+  name = create_name (source, destination, type);
+
   babl = babl_db_exist (db, id, name);
-  if (babl) 
+  if (babl)
     {
       /* There is an instance already registered by the required id/name,
        * returning the preexistent one instead.
@@ -277,7 +279,7 @@ babl_conversion_new (void *first_arg,
   babl_db_insert (db, babl);
   if (!source->type.from_list)
     source->type.from_list = babl_list_init_with_size (BABL_CONVERSIONS);
-  babl_list_insert_last (source->type.from_list, babl);  
+  babl_list_insert_last (source->type.from_list, babl);
   return babl;
 }
 
index beb5364c155cf5a749def68faed5944ee42a4b78..bf1bc8062a8a0efdbd73a635b787d9d12bdb4a66 100644 (file)
@@ -170,7 +170,7 @@ convert_from_double (BablFormat *destination_fmt,
   dst_img->data[0]  = destination_buf;
   dst_img->type[0]  = (BablType *) babl_type_id (BABL_DOUBLE);
   dst_img->pitch[0] = destination_fmt->bytes_per_pixel;
-  dst_img->stride   = 0;
+  dst_img->stride[0] = 0;
 
   for (i = 0; i < destination_fmt->components; i++)
     {
index e9c40284a9697edd2c7ee892f2871fb88bd0e36a..72d6a7904a38d05aec3c3c0314010fabe299c4d1 100644 (file)
@@ -142,7 +142,7 @@ real_babl_log (const char *file,
   va_end (varg);
 
   fprintf (stdout, "\n");
-  fflush (0);
+  fflush (NULL);
   return;
   hack_hack ();
 }